home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / libs / x / xview / xview3.004 / xview3 / usr / openwin / include / xview_private / charscreen.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-29  |  1.4 KB  |  53 lines

  1. /*    @(#)charscreen.h 20.12 93/06/28 SMI    */
  2.  
  3. /*
  4.  *    (c) Copyright 1989 Sun Microsystems, Inc. Sun design patents 
  5.  *    pending in the U.S. and foreign countries. See LEGAL NOTICE 
  6.  *    file for terms of the license.
  7.  */
  8.  
  9. /*
  10.  * Definitions relating to physical screen image.
  11.  */
  12.  
  13. /*
  14.  * Macros to convert character coordinates to pixel coordinates.
  15.  */
  16. #define row_to_y(row)    ((row)*chrheight)
  17. #define col_to_x(col)    (((col)*chrwidth) + chrleftmargin)
  18. #define y_to_row(y)    ((y)/chrheight)
  19. #define x_to_col(x)    ((((x) >= chrleftmargin) ? \
  20.               ((x) - chrleftmargin) : 0)/chrwidth)
  21.  
  22. /*
  23.  * Character dimensions (fixed width fonts only!)
  24.  * and of screen in pixels.
  25.  */
  26. #if !defined(__linux) || defined(__DEFINE_CHARSCREEN_VARS)
  27. int    chrheight, chrwidth, chrbase;
  28. int    winheightp, winwidthp;
  29. int    chrleftmargin;
  30.  
  31. struct    pixfont *pixfont;
  32.  
  33. /*
  34.  * If delaypainting, delay painting.  Set when clear screen.
  35.  * When input will block then paint characters (! white space) of entire image
  36.  * and turn delaypainting off.
  37.  */
  38. int    delaypainting;
  39. #else /* __linux && !__DEFINE_CHARSCREEN_VARS */
  40. extern int    chrheight, chrwidth, chrbase;
  41. extern int    winheightp, winwidthp;
  42. extern int    chrleftmargin;
  43. extern struct    pixfont *pixfont;
  44. extern int    delaypainting;
  45. #endif
  46.  
  47. #ifdef cplus
  48. void    ttysw_pstring(char *s, int col, int row);
  49. void    ttysw_pclearline(int fromcol, int tocol, int row);
  50. void    ttysw_pcopyline(int fromcol, int tocol, int count, int row);
  51. void    ttysw_pclearscreen(int fromrow, int torow, int count);
  52. #endif
  53.